package cn.android.support.v7.lib.sin.crown.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public abstract class BaseFragment extends Fragment {

    View view;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
//        使用下面这个方法，上面的 return super.onCreateView可以屏蔽掉
//        if (view == null) {
//            view = inflater.inflate(R.layout.fragment_real_name, container, false);
//            initUI(view);
//            listenner();
//        }
//        return view;
    }

    //初始化UI
    protected abstract void initUI(View view);

    //初始监听事件
    protected abstract void listenner();
}
